 package com.gmrz.uaf.common;
 
 public class UAFCommonRuntimeException extends RuntimeException
 {
   IErrorCode ec;

   public UAFCommonRuntimeException(IErrorCode ec)
   {
     super(ec.toString());
     this.ec = ec;
   }

   public UAFCommonRuntimeException(IErrorCode ec, String msg) {
     super(new StringBuilder().append(msg == null ? "" : msg).append(ec.toString()).toString());
     this.ec = ec;
   }

   public UAFCommonRuntimeException( String msg) {
     super(new StringBuilder().append(msg == null ? "" : msg).toString());
   }

   public UAFCommonRuntimeException(IErrorCode ec, Throwable t) {
     super(ec.toString(), t);
     this.ec = ec;
   }

   public UAFCommonRuntimeException(IErrorCode ec, String msg, Throwable t) {
     super(new StringBuilder().append(msg == null ? "" : msg).append(ec.toString()).toString(), t);
     this.ec = ec;
   }
 
   public IErrorCode getErrorCode() {
     return this.ec;
   }
 }
